<?php

namespace App\Models\Mes;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class AuthRole extends Base
{
    use HasFactory;

    protected $table = "auth_roles";

    public function menus()
    {
        return $this->hasManyThrough(AuthMenu::class, AuthRoleMenu::class, "role_id", "id", "menu_id");
    }

    public function role_menus()
    {
        return $this->hasMany(AuthRoleMenu::class, "role_id");
    }
}
